package com.springcloud.travel.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author fyb
 * @version 1.0
 * @date 2021/3/24 9:10
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_order")
public class Order {

    @TableId(type = IdType.AUTO)
    private Long orderId;
    //订单号
    private String orderNumber;
    //订单名称
    private String orderName;
    @DateTimeFormat(pattern= "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date startTime;
    //下单时间
    //购买数量
    private String payNumber;
    //金额
    private BigDecimal price;
    //订单状态 (0，取消支付，1，y已支付，2，待支付)
    private Integer orderState;
    //景点id
    @TableField(exist = false)
    private Long sceneryId;
    //路线id
    private Long lineId;
    //机票id
    @TableField(exist = false)
    private Long planeTicketId;


}
